﻿using System;

/*
  Write a program that prints all the numbers from 1 to N, that are not divisible by 3 and 7 at the same time.
 */

class MinAndMax
{
    static void Main(string[] args)
    {
        Console.Write("Enter the amount of numbers to read: ");
        int numbersToRead = Convert.ToInt32(Console.ReadLine());

        int maxNumber = 0;
        int minNumber = 0;

        for (int i = 1; i <= numbersToRead; i++)
        {
            Console.Write("Enter number {0} : ", i);
            int userInput = Convert.ToInt32(Console.ReadLine());

            if (i == 1)
            {
                minNumber = userInput;
                maxNumber = userInput;
                continue;
            }
            
            if (userInput < minNumber)
            {
                minNumber = userInput;
            }
            if (userInput > maxNumber)
            {
                maxNumber = userInput;
            }
        }

        Console.WriteLine("Max Value: {0}", maxNumber);
        Console.WriteLine("Min Value: {0}", minNumber);
    }
}

